import Joystick from '../Joystick'
const { ccclass, property } = cc._decorator;

@ccclass
export default class NewClass extends cc.Component {

    @property(cc.TiledMap)
    curMap: cc.TiledMap = null;

    @property(cc.Node)
    yaogan: cc.Node = null;

    @property(cc.Prefab)
    bullet: cc.Prefab = null;

    @property(cc.Node)
    tank: cc.Prefab = null;

    //最大数量
    maxCount: number = 5;

    //出生地
    bornPoses: cc.Vec2[];

    //坦克皮肤
    spriteFrames: cc.SpriteFrame = null;

     //坦克移动速度
     tankSpeeds:number=0;

       //坦克子弹发射间隔时间
     tankFireTimes:number=0;

     //坦克血量
     tankBloods:number=0;

     _joystickCtrl:cc.Node=null;
     _tiledMap:cc.TiledMap=null;
     _curAngle=null;

    onLoad () {
        // cc.director.setDisplayStats(true);
        // 获取摇杆控制组件
        this._joystickCtrl = this.yaogan.getComponent("Joystick");
        // 获取地图 TiledMap 组件
        this._tiledMap = this.curMap.getComponent(cc.TiledMap);
    }

    start() {

    }

    setEventListener(){
        this._joystickCtrl
    }

    // update (dt) {}
}
